package structures;
/**
 * A project list entry.
 * Because a simple string in the project list doesn't give me access to the
 * unique identifier (project_id) of a project and because using a Project
 * class means either creating a custom table model or limiting Project's
 * toString to print only name (or id and name)
 * @author darin
 *
 */
public class ProjectListEntry {
	/**
	 * The project_id.
	 */
	private int projectId;
	/**
	 * the project_name.
	 */
	private String projectName;

	/**
	 * an empty constructor.
	 */
	public ProjectListEntry() { };
	/**
	 * Create a new ProjectListEntry with specified id and name.
	 * @param id the project_id
	 * @param name the project_name
	 */
	public ProjectListEntry(final int id, final String name) {
		projectId = id;
		projectName = name;
	}

	/**
	 * @return int the project Id
	 */
	public final int getProjectId() {
		return projectId;
	}

	/**
	 * @param id the project id to set
	 */
	public final void setProjectId(final int id) {
		projectId = id;
	}

	/**
	 * @return String the project_name
	 */
	public final String getProjectName() {
		return projectName;
	}

	/**
	 * @param name String the project_name to set
	 */
	public final void setProjectName(final String name) {
		projectName = name;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public final String toString() {
		return "[" + projectId + "] " + projectName;
	}



}
